#!/bin/bash
echo -e "create file with date"
read -p 'please input you filename:' filename
date1=$(date --date='2 days ago' +%Y%m%d) # 引号内的不是字面量
date2=$(date --date='1 days ago' +%Y%m%d)
date3=$(date --date='now' +%Y%m%d)
file1=${filename}${date1}.txt
file2=${filename}${date2}.txt
file3=${filename}${date3}.txt
touch $file1
touch $file2
touch $file3
#touch "$file1"
#touch "$file2"
#touch "$file3"
